<script setup>
import { Switch, Message } from '@element-plus/icons-vue';
</script>
<template>
  <div class="left">
          <div class="logo">
            <img src="@/assets/images/logo.png" alt="">
            <span>AI ViviPlay</span>
          </div>
          <div class="change">
            <el-button type="primary" plain class="changeButton">
              <el-icon><Switch /></el-icon>&nbsp;切换新角色
            </el-button>
          </div>
          <div class="messageheader">
            <el-icon><Message /></el-icon>最近对话
          </div>
          <div class="messagelist">
            <div class="message" v-for="i in 8" :key="i">
              <p>{{i}}.历史对话历史对话历史对话历史对话历史对话历史对话</p>
            </div>
          </div>
        </div>
</template>



<style scoped>
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #fff;
}
.logo span {
  font-size: 16px;
  font-weight: 500;
  color: #333;
}
.change {
  text-align: center;
  margin-top: 10px;
}
.change .changeButton {
  width: 95%;
  font-size: 14px;
  background: linear-gradient(to right, #87ceeb, #a285dd);
}
.messageheader {
  display: flex;
  margin-top: 15px;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: #666;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}
.messagelist {
  margin-top: 12px;
  width: 100%;
  gap: 8px;
  display: flex;
  flex-direction: column;
}
.message {
  height: 50px;
  background-color: #e6f7ff;
  border-radius: 6px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  transition: background-color 0.2s;
}
.message:hover {
  background-color: #98d3f4;
  border-color: #bae6fd;
}
.message p {
  width: 100%;
  margin: 0;
  font-size: 14px;
  color: #333;
  text-overflow: ellipsis;
  overflow: hidden;
}
</style>